package java_io.autoclose;

public class TestAutoClose {

	public static void main(String[] args) {
		// We can not declare m in try as it will not be visible in finally block
		AutoClose a = null;
		try {
			a = new AutoClose();
			a.test();
		}finally{
			try{
				a.close();
			}catch(Exception ex){
				System.out.println(ex.toString());
			}
		}

	}

}
